package com.woniuxy.rabc.service.impl;

import com.woniuxy.rabc.dto.UserDto;
import com.woniuxy.rabc.entity.SysUser;
import com.woniuxy.rabc.mapper.SysUserMapper;
import com.woniuxy.rabc.service.UserService;
import com.woniuxy.rabc.vo.UserVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private SysUserMapper sysUserMapper;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return sysUserMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(SysUser record) {
        return sysUserMapper.insert(record);
    }

    @Override
    public int insertSelective(SysUser record) {
        return sysUserMapper.insertSelective(record);
    }

    @Override
    public SysUser selectByPrimaryKey(Long id) {
        return sysUserMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(SysUser record) {
        return sysUserMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(SysUser record) {
        return sysUserMapper.updateByPrimaryKey(record);
    }

    @Override
    public SysUser selectByTelAndPwd(UserDto userDto) {
        return sysUserMapper.selectByTelAndPwd(userDto);
    }

    @Override

    public List<UserVo> selectByLike(UserDto userDto) {
        return sysUserMapper.selectByLike(userDto);
    }

    @Override
    public List<SysUser> selectByDeptId(Long deptID) {
        return sysUserMapper.selectByDeptId(deptID);
    }
}
